<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>圣杯布局</title>
    <style>
        * {
            box-sizing: border-box;
        }
        
        body {
            margin: 0;
            color: #fff;
            /*为了适应背景 把字体颜色调成白色*/
        }
        
        header {
            width: 100%;
            height: 50px;
            background: #6daca7;
            line-height: 50px;
            text-align: center;
        }
        
        footer {
            width: 100%;
            height: 30px;
            background: #52797a;
            clear: both;
            line-height: 30px;
            text-align: center;
        }
        
        .left,
        .right,
        .middle {
            position: relative;
            float: left;
        }
        
        .left {
            position: relative;
            left: -200px;
            width: 200px;
            background: #1b4887;
            margin-left: -100%;
        }
        
        .right {
            width: 150px;
            background: #578353;
            margin-right: -150px;
        }
        
        .middle {
            width: 100%;
            background: #138686;
        }
        
        .container {
            padding-left: 200px;
            padding-right: 150px;
        }
    </style>
</head>

<body>

    <header>
        header
    </header>
    <div class="container">
        <div class="middle">middle
            <p>hello</p>
        </div>
        <div class="left">left</div>
        <div class="right">right</div>
    </div>
    <footer>
        footer
    </footer>

</body>

</html>